setFeatureState

abstract fun setFeatureState(@NonNull() sourceId: String, @Nullable() sourceLayerId: String, @NonNull() featureId: String, @NonNull() state: Value)

Updates the state object of a feature within a style source.Update entries in the `state` object of a given feature within a style source. Only properties of the`state` object will be updated. A property in the feature `state` object that is not listed in `state` willretain its previous value.Note that updates to feature `state` are asynchronous, so changes made by this method migth not beimmediately visible using `getStateFeature`.

Parameters

sourceId

The style source identifier.

sourceLayerId

The style source layer identifier (for multi-layer sources such as vector sources).

featureId

The feature identifier of the feature whose state should be updated.

state

The `state` object with properties to update with their respective new values.